﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="adminClient.aspx.cs" Inherits="Admin_adminClient" %>
<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>客户管理</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/common.js"></script>
</head>
<body onload="$('#loading').hide()">
    <form id="form2" runat="server">
<div class="container" id="cpcontainer">
<%=input%>
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div> 
<table class="tb" id="TABLE1">
        <tr align="center">
            <td align="left" colspan="10" style="height: 25px">
                用户名：<input id="txt_userName" type="text" />
                &nbsp;
                用户手机：<input id="txt_phone" type="text" />&nbsp;&nbsp; 用户邮箱：<input id="txt_email" type="text" />
                &nbsp; 是否冻结：<select id="select_state" style="width: 100px">
                <option value="" selected="selected">所有用户</option>
                    <option value="0">已冻结</option>
                    <option value="1">未冻结</option>
                </select>
                &nbsp;
                <input id="Button1" class="btn" onclick="SelectKey('')" type="button" value="查询..." /></td>
        </tr> 
    <tr align="center">
        <td align="left" colspan="10" style="height: 25px">
        </td>
    </tr>
        <tr align="center">
			<td style="height: 25px; width: 5%;">
                用户姓名</td>
			<td style="height: 25px;">
                用户名</td>
            <td style="height: 25px; width: 3%;">
                性别</td>
			<td  style="height: 25px;">
                用户手机</td>	
            <td  style="height: 25px; width: 8%;">
                用户座机</td>	
            <td style="height: 25px">
                QQ</td>
            <td style="height: 25px;">
                用户邮箱</td>
            <td style="height: 25px">
                用户工作地址</td>
            <td style="height: 25px">
                注册日期</td>
            <td style="height: 25px" align="left">
                操作</td>
        </tr>  
        <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate> 
        <tr align="center">       
        <td><%#Eval("userXM")%></td>
        <td><a title="点击用户名查看用户的提问" href="adminQuestion.aspx?user=<%#Eval("userName") %>"><%#Eval("userName")%></a></td>
        <td><%#Eval("userSex")%></td>
        <td> <%#Eval("userPhone")%> </td>
        <td><%#Eval("userTel")%></td>
        <td><%#Eval("uerQQ")%></td>
        <td><%#Eval("userEmail")%></td>        
        <td> <%#Eval("userMark")%> </td>
        <td> <%#Eval("userData","{0:D}")%> </td>
        <td>        	   		
        <input id="Button1" class='btn' type="button" title='<%#Eval("userid") %>' lang="zh/questions.aspx" value="客服提问" onclick="$('#loading').show();ajax_get(convertURL('adminClient.aspx?action=Question&uid='+this.title+'&page='+this.lang),'',function(msg){window.open('../'+msg,'_blank');$('#loading').hide()})"/>        
        <input id="Button3" class='btn' title='<%#Eval("userid") %>' lang="zh/Favorites.aspx" type="button" value="产看收藏" onclick="$('#loading').show();ajax_get(convertURL('adminClient.aspx?action=Question&uid='+this.title+'&page='+this.lang),'',function(msg){window.open('../'+msg,'_blank');$('#loading').hide()})"/>
        <input id="Button2" lang="<%#Eval("userid") %>" class='btn' type="button" value="<%#Convert.ToInt32(Eval("userState"))==0?"解冻用户":"冻结用户" %>" title='<%#Eval("userState") %>' onclick="if(confirm('确定操作该用户吗?')){$('#loading').show();ajax_get(convertURL('adminClient.aspx?action=Freeze&uid='+this.lang+'&state='+this.title),'',function(msg){$('#cpcontainer').empty().append(msg);$('#loading').hide()});}else{return false}"/>
        <input id="btnDel" type="button" value="删除" class='btn' title='<%#Eval("userid") %>' onclick="if(confirm('确定要删除吗?')){$('#loading').show();ajax_get(convertURL('adminClient.aspx?action=del&uid='+this.title),'',function(msg){$('#cpcontainer').empty().append(msg);$('#loading').hide()});}else{return false}"/>
        </td>
         </tr>
        </ItemTemplate>
        </asp:Repeater>
        <tr><td colspan="12" style="height:24px"></td>
        </tr>
        <tr>
            <td colspan="12">
                <div class="pages"><%htmlpaging();%></div>
            </td>
        </tr>
        </table>
  <uc1:adminfoot ID="Adminfoot1" runat="server" />
</div>
 </form>
</body>
</html>
    <script type="text/javascript" >
   function SelectKey(url)
   {
      $("#loading").show();
      url=convertURL("?userState="+escape($("#select_state option:selected").attr("value"))+"&userEmail="+$("#txt_email").attr("value")+"&userPhone="+$("#txt_phone").attr("value")+"&userName="+$("#txt_userName").attr("value")+"&CurrentIndex=1");
       $("#loading").show();
      ajax_get(url,'',function(msg)
      {
            $("#cpcontainer").empty().append(msg);
            $("#loading").hide();
      });
       
   }
    function changePage(name)
    {
//        var pid=convertURL($(name).attr("name"));
//        $.get(pid,'',function(data,state){$("#cpcontainer").empty().append(data)}); 
    }
    </script>
